projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8109520
)
levelbar: fix a crash
author
Cosimo Cecchi
<cosimoc@gnome.org>
Sun, 3 Jan 2016 02:14:47 +0000
(18:14 -0800)
committer
Cosimo Cecchi
<cosimoc@gnome.org>
Sun, 3 Jan 2016 02:44:07 +0000
(18:44 -0800)
We should not try to access a block with an index that exceeds the
number of blocks in the widget.
gtk/gtklevelbar.c
patch
|
blob
|
history
diff --git
a/gtk/gtklevelbar.c
b/gtk/gtklevelbar.c
index 45d9d4a0c68be69c554e6c344d1e112fd5e4feb3..7259f85de5be5a67c8eda556cfc281bd45056919 100644
(file)
--- a/
gtk/gtklevelbar.c
+++ b/
gtk/gtklevelbar.c
@@
-712,6
+712,8
@@
update_level_style_classes (GtkLevelBar *self)
num_blocks = (gint) round (priv->max_value) - (gint) round (priv->min_value);
}
+ num_filled = MIN (num_blocks, num_filled);
+
classes[0] = "filled";
classes[1] = value_class;
for (i = 0; i < num_filled; i++)